package com.by.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.by.entity.SkuStock;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author 江俊俊
 * @version 1.0
 * @description
 * @date 2025/4/10 21:06
 * @since JDK1.8
 */
@Mapper
public interface SkuStockMapper extends BaseMapper<SkuStock> {


    /**
     * 锁定库存
     * @param skuId
     * @param num 库存数量
     * @return
     */
    int lockStock(@Param("skuId") Long skuId, @Param("num") int num);
}
